package cn.gson.crm.control.source;


import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.control.base.BaseServlet;
import cn.gson.crm.model.dao.SourceDao;

/**
 * Servlet implementation class DeleteSourceServlet
 */
@WebServlet("/source/delete")
public class DeleteSourceServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
    private SourceDao sd=new SourceDao();
	@Override
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String[] ids = request.getParameterValues("id");
		System.out.println(ids.length);
			for (String id : ids) {
				sd.deleteSourceById(id);
	}
	redirect("source");
}
}
